-
Notifications
You must be signed in to change notification settings - Fork 501
ci: cursor rules for consistent quality docstring production #7316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ExceptionType: When and why this exception is raised. | ||
""" # noqa: E501 | ||
``` | ||
_Note: Inclide ` # noqa: E501` to avoid conflicts with CI._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a typo in the note: Inclide
should be Include
.
_Note: Inclide ` # noqa: E501` to avoid conflicts with CI._ | |
_Note: Include ` # noqa: E501` to avoid conflicts with CI._ |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
## Types | ||
- Use Python type annotations in function signatures | ||
- Use descriptive types in docstrings (`dict` instead of `Dict`, etc.) | ||
- For unions use `type1 or type2` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is missing a newline at the end, which is a common standard in text files. Adding a newline after the last line will ensure compatibility with various tools and follow standard file formatting conventions. This can be fixed by simply adding an empty line after - For unions use
type1 or type2``
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
description: | ||
globs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description
and globs
fields are currently empty in the rule configuration. For the rule to function properly:
- Add a descriptive summary to the
description
field (e.g.,"Enforces Google-style docstrings for Python code"
) - Specify target files in the
globs
field (e.g.,"*.py"
) to define which files this rule should apply to
While alwaysApply: true
is set, explicitly defining these fields will improve rule clarity and maintainability.
description: | |
globs: | |
description: "Enforces Google-style docstrings for Python code" | |
globs: "*.py" | |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Cursor rule for producing consistent quality docstrings.
Use with Ctrl+k or side Chat to produce a 90% complete quality docstring.
Note: does not work for tabbing https://forum.cursor.com/t/does-cursor-tab-use-rules-for-ai-or-cursorrules/39355